/*
 * @FileName: app_comm.h
 * @Author: GreyQiu qiushaogui@aikosolar.com
 * @Date: 2023-08-21 16:44:51
 * @LastEditors: GreyQiu qiushaogui@aikosolar.com
 * @LastEditTime: 2023-11-09 16:46:10
 * @Description: 
 * 
 * Copyright (c) 2023, All Rights Reserved. 
 */

#ifndef __APP_WIFI_H__
#define __APP_WIFI_H__

#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>
// 命令定义
typedef enum {
    CMD_ON_OFF = 0x01, // 快速关断
    CMD_VIN,
    CMD_IIN,
    CMD_VOUT,
    CMD_IOUT,
    CMD_PIN,
    CMD_TEMP,
    CMD_FAULT,
    CMD_ALL_STATUS = 0x12,
    CMD_SW_VERSION = 0x13,
    CMD_HW_VERSION = 0x14,
    CMD_CALIBRATION_VIN = 0x1C,
    CMD_CALIBRATION_IIN,
    CMD_CALIBRATION_VOUT,
    CMD_CALIBRATION_IOUT,
    CMD_BOOT_UNLOCK = 0x41,
    CMD_BOOT_JUMP_BOOT =  0x42,
    CMD_BOOT_JUMP_APP =  0x46,
    CMD_RUN_MODE =  0x47,

    CMD_SAMPLE_V1 =  0xF0,
    CMD_SAMPLE_V2 =  0xF1,
    CMD_SAMPLE_I1 =  0xF2,
    CMD_SAMPLE_I2 =  0xF3,
    CMD_SAMPLE_COMPLETE =  0xF4,
    CMD_RESET_CAL =  0xF5,


    CMD_NUM = 26
} cmd_id_t;

void app_comm_handle(uint8_t * buf, uint32_t len);
void app_comm_init(void);
#endif // __APP_WIFI_H__
